package swa23.provider.impl;
 
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import swa2012.telco.broker.beans.Client;
import swa23.provider.interfaces.ClientRegistry;
//import swa2012.telco.sp.ClientRegistry;
 
public class ClientRegistryImpl implements ClientRegistry {
	private final Map<String, Client> clientRegistry = new ConcurrentHashMap();
 
	public void putClient(Client client) {
		String clientID = client.getID();
		if ((clientID == null) || (clientID.isEmpty()))
			return;
		this.clientRegistry.put(clientID, client);
	}
 
	public void removeClient(String clientID) {
		if ((clientID == null) || (clientID.isEmpty()))
			return;
		this.clientRegistry.remove(clientID);
	}

	public Collection<Client> getClients() {
		return this.clientRegistry.values();
	}
}
